const baseURL = '/upload';
import request from '@/utils/request';

/**
 * 上传文件
 * @param {Object} data 上传文件数据
 * @returns {Promise} 上传文件结果
 */
export const uploadFile = (dataForm) => {
    return request({
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        url: `${baseURL}/file`,
        method: 'post',
        data: dataForm
    })
}


export const uploadAvatar = (dataForm) => {
    return request({
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        url: `${baseURL}/image`,
        method: 'post',
        data: dataForm
    })
}